﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Gameinfo : MonoBehaviour {

    
    
    

    public GameObject ContentInfo;
    private GameObject temp;
    private int infoCount;




  public  void Getinfo(string info)
    {
        temp = LoadPrefab.Instance.LoadPrefab2Scenes<GameObject>("txtinfo", true, "infoView/Viewport/Content");
        temp.GetComponent<Text>().text = info;
        infoCount = ContentInfo.transform.childCount;
        Debug.Log(infoCount);
        if (infoCount>6)
        {
            ContentInfo.transform.GetChild(0).GetComponent<DeleteInfo>().Des(); ;
        }
    }
}
